﻿
using A.M.ETO;
using DotNetCore.CAP;
using L.M.Review.Application.IServices;
using L.M.Review.Domain.DTO;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace L.M.Review.Read.API.Controllers
{
    /// <summary>
    /// 审批单
    /// </summary>
    [Route("api/[controller]")]
    [ApiController]
    public class Snfor_approval_formController : ControllerBase
    {
        private readonly ISnfor_approval_formServices snfor_Approval_FormServices;
        private readonly ICapPublisher capPublisher;
        public Snfor_approval_formController(ISnfor_approval_formServices snfor_Approval_FormServices)
        {
            this.snfor_Approval_FormServices = snfor_Approval_FormServices;
        }

        /// <summary>
        /// 添加审批单 + 审批实例表 + 审批流转记录表
        /// </summary>
        /// <param name="addStaffInforDTO"></param>
        /// <returns></returns>
        [HttpPost]
        [CapSubscribe("addStaffInforDTOGer")]
        public async Task<IActionResult> AddStaffInfor(AddStaffInforDTO addStaffInforDTO)
        {
            return Ok(await snfor_Approval_FormServices.AddStaffInfor(addStaffInforDTO));
        }
    }
}
